package graph;

import java.util.ArrayList;


/**
 *
 * @author sanichan
 */
public class User {

    private Long id_user;
    private String nom;
    private String prenom;
    private String sexe;
    private String anniversaire;
    private String update_date;
    private Location habitat;
    private ArrayList<SchoolYear> cursus; 
    private ArrayList<Work> carriere;
    private ArrayList<GeoTag> hasTagged;
    private ArrayList<GeoTag> hasBeenTagged;
    private ArrayList<Like> likes;

    
    
    
    public User(Long id_user, String nom, String prenom, String sexe, String anniversaire, String update_date, Location loc) {
        this.id_user = id_user;
        this.nom = nom;
        this.prenom = prenom;
        this.sexe = sexe;
        this.anniversaire = anniversaire;
        this.update_date = update_date;
        this.habitat = loc;
        
        carriere = new ArrayList<Work>();
        cursus = new ArrayList<SchoolYear>();
        likes = new ArrayList<Like>();
        hasTagged = new ArrayList<GeoTag>();
        hasBeenTagged = new ArrayList<GeoTag>();
    }
    
    /*public String toString(){
        String s = id_user + "\t" + nom + "\t" + prenom + "\t"  + sexe +  "\t" + anniversaire + "\t" + update_date + "\t" 
                           + likes.toString() + habitat.toString() + "\t" + cursus.toString() + "\t" + carriere.toString() +"\n";
        return (s);
    }*/

    @Override
    public String toString() {
        return "nom = " + nom + ", prenom = " + prenom + "\nsexe = " + sexe + "\nanniversaire = " + anniversaire + "\nhabitat = " + habitat + '}';
    }
    
    

   /* @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final User other = (User) obj;
        if (this.id_user.equals(other.id_user)) {
            return false;
        }
        return true;
    }*/

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }
    
    

    @Override
    public int hashCode() {
        int hash = 5;
        return hash;
    }

    public String getAnniversaire() {
        return anniversaire;
    }

    public Location getHabitat() {
        return habitat;
    }

    public Long getId_user() {
        return id_user;
    }

    public String getNom() {
        return nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public String getSexe() {
        return sexe;
    }

    public String getUpdate_date() {
        return update_date;
    }

    public ArrayList<Work> getCarriere() {
        return carriere;
    }

    public ArrayList<SchoolYear> getCursus() {
        return cursus;
    }

    public ArrayList<GeoTag> getHasBeenTagged() {
        return hasBeenTagged;
    }

    public ArrayList<GeoTag> getHasTagged() {
        return hasTagged;
    }

    public ArrayList<Like> getLikes() {
        return likes;
    }
    
    
    public void addWork(Work w)
    {
        carriere.add(w);
    }
    
    public void addSchoolYear(SchoolYear sy)
    {
        cursus.add(sy);
    }
    
    public void addHasTagged(GeoTag gt)
    {
        hasTagged.add(gt);
    }
    
    public void addHasBeenTagged(GeoTag gt)
    {
        hasBeenTagged.add(gt);
    }
    
    public void addLike(Like l)
    {
        likes.add(l);
    }
}
